﻿using Domain.Models;
using GitSyncApp.Models;
using Quartz;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace GitSyncApp.IServices
{
    public interface ISyncJobService
    {
        IReadOnlyDictionary<string, SyncJob> JobFactory { get; }
        Task StartAsync(CancellationToken cancellationToken = default);
        Task StopAsync(CancellationToken cancellationToken = default);
        Task<SyncJob> CreateAsync(GitLibaray git, CancellationToken cancellationToken = default);
        Task<Result> CreateCollectionAsync(IReadOnlyCollection<GitLibaray> gits, CancellationToken cancellationToken = default);
        Task<Result> RemoveAsync(GitLibaray git, CancellationToken cancellationToken = default);
        Task<Result> PauseAsync(GitLibaray git, CancellationToken cancellationToken = default);
        Task<Result> ResumeAsync(GitLibaray git, CancellationToken cancellationToken = default);
        Task<Result> PauseAllAsync(CancellationToken cancellationToken = default);
        Task<Result> ResumeAllAsync(CancellationToken cancellationToken = default);
    }
}
